package web.dropwizard.configuration;

import com.fasterxml.jackson.annotation.JsonProperty;
import io.dropwizard.Configuration;
import io.dropwizard.client.JerseyClientConfiguration;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;

/**
 * @author Gregory Boissinot
 */
public class ProjectConfiguration extends Configuration {

    @JsonProperty(value = "mongo")
    @NotNull
    private MongoConfig mongoConfig;

    @JsonProperty(value = "jenkins")
    @NotNull
    private JenkinsConfig jenkinsConfig;

    @Valid
    @NotNull
    @JsonProperty
    private JerseyClientConfiguration httpClient = new JerseyClientConfiguration();

    public JerseyClientConfiguration getJerseyClientConfiguration() {
        return httpClient;
    }

    public MongoConfig getMongoConfig() {
        return mongoConfig;
    }

    public void setMongoConfig(MongoConfig mongoConfig) {
        this.mongoConfig = mongoConfig;
    }

    public JenkinsConfig getJenkinsConfig() {
        return jenkinsConfig;
    }

    public void setJenkinsConfig(JenkinsConfig jenkinsConfig) {
        this.jenkinsConfig = jenkinsConfig;
    }
}
